﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AuthTemplate.DTO.Common
{
    public class DicDto
    {
        public string Key { get; set; }

        public string Value { get; set; }

        public static List<DicDto> DicToDto(Dictionary<string,string> dic)
        {
            List<DicDto> dtos = new List<DicDto>();
            foreach (var key in dic.Keys)
            {
                dtos.Add(
                    new DicDto {
                        Key = key, Value = dic[key]
                    }
                );
            }
            return dtos;
        }
    }
}
